<template>
    <div>

        <select :value='cityId' @change="OnOptionSelect">
            <option value=101>北京</option>
            <option value=102>上海</option>
            <option value=103>武汉</option>
            <option value=104>成都</option>
        </select>
    </div>
</template>

<script>
export default {

    props: {
        cityId: {
            type: Number,
            default: 101
        }
    },

    methods: {
        OnOptionSelect(event) {
            const selectedValue = Number(event.target.value);
            this.$emit('city-select', selectedValue);
        }

    }
}
</script>

<style></style>